﻿using JoeyLibs.IdleStartMenu.Interfaces;
using JoeyLibs.IdleStartMenu.IViewModel;
using JoeyLibs.IdleStartMenu.Services;
using JoeyLibs.IdleStartMenu.ViewModels;
using Microsoft.Practices.Unity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JoeyLibs.IdleStartMenu.WPFUI
{
    public class ContainerHelper
    {
        private static IUnityContainer container;
        public static IUnityContainer Container
        {
            get
            {
                if (container == null)
                    container = CreateUnityContainer();

                return container;
            }
        }

        private static IUnityContainer CreateUnityContainer()
        {
            IUnityContainer container = new UnityContainer();
            container.RegisterType<IDataProvider, MenuConfig>().RegisterType<IMainViewModel, MainViewModel>();

            return container;
        }
    }
}
